package com.carkeeper.subject.controller;

import com.carkeeper.subject.service.EsayService;
import com.carkeeper.entity.Result;
import com.carkeeper.entity.StatusCode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/esay")
public class EsayController {

    @Autowired
    private EsayService esayService;

    /**
     * 生成车主信息表格
     * @return
     */
    @GetMapping("/esayExcel")
    @ResponseBody
    public Result esayExcel(@RequestParam("currentpage") Integer currentpage,@RequestParam("pagesize") Integer pagesize) {
        esayService.createEsay(currentpage,pagesize);
        return new Result(true, StatusCode.OK, "成功");
    }
}
